import { FC } from 'react'
import { Routes, Route } from 'react-router-dom'
import App from './App'
import { router } from '@/config/menuConfig'

const Router: FC = () => {
    return <Routes >
        <Route path="/" element={<App />}>
            {router.map((item, key) => <Route key={key} path={item.path} element={item.element}></Route>)}
        </Route>
    </Routes>
}

export default Router;